/**
 * $Id: main.c 3 2010-10-02 23:39:41Z pmedia@xi-intersection.net $
 */

// -----------------------------------------------------------------------------
// Includes
// -----------------------------------------------------------------------------

// Globals (e.g. system functions and globally shared definitions)
#include "include/global.h"

// Game Modules
#include "include/init-deinit.h"
#include "include/input.h"
#include "include/logic.h"
#include "include/main.h"
#include "include/render.h"

// -----------------------------------------------------------------------------
// Global Variables
// -----------------------------------------------------------------------------

int termination = FALSE;

// -----------------------------------------------------------------------------
// Function
// -----------------------------------------------------------------------------

/**
 * Mainloop
 * 
 * Does init calls and deinit calls on its own.
 * Furthermore, there is the name-giving mainloop, which consist of a looped
 * call of rendering, input handling and logic handling.
 * 
 * @param int          argc Argument Count
 * @param char ptr ptr argv Argument List
 * 
 */

int main(int argc, char *argv[]) {
	init(argc, argv);
	
	do {
		input();
		logic();
		render();
	}
	while (!termination);
	
	deinit();
	return 0;
}
